package com.example.demo.msg.netty.common;/**
 * Created by kete on 2018-08-13.
 */

import org.msgpack.annotation.Message;

/**
 * 作者：kete
 * 创建时间：2018-08-13 11:48
 * 功能描述：
 * 版本：
 */
@Message
public class Imessage {
    //应用ID
    private byte appId;
    //版本号
    private int version;
    //用户ID
    private Integer uid;
    //消息类型    0:登陆    1：文字消息
    private byte msgType;
    //接收方
    private Integer receiveId;
    //消息内容
    private String msg;

    public Imessage() {
    }

    public Imessage(byte appId, int version, Integer uid, byte msgType, Integer receiveId, String msg) {
        this.appId = appId;
        this.version = version;
        this.uid = uid;
        this.msgType = msgType;
        this.receiveId = receiveId;
        this.msg = msg;
    }

    public Imessage(Integer uid, byte msgType, Integer receiveId, String msg) {
        this.uid = uid;
        this.msgType = msgType;
        this.receiveId = receiveId;
        this.msg = msg;
    }

    public byte getAppId() {
        return appId;
    }

    public void setAppId(byte appId) {
        this.appId = appId;
    }

    public int getVersion() {
        return version;
    }

    public void setVersion(int version) {
        this.version = version;
    }

    public Integer getUid() {
        return uid;
    }

    public void setUid(Integer uid) {
        this.uid = uid;
    }

    public byte getMsgType() {
        return msgType;
    }

    public void setMsgType(byte msgType) {
        this.msgType = msgType;
    }

    public Integer getReceiveId() {
        return receiveId;
    }

    public void setReceiveId(Integer receiveId) {
        this.receiveId = receiveId;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }


    @Override
    public String toString() {
        return "Imessage{" +
                "msg='" + msg + '\'' +
                '}';
    }
}
